// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 每日放送 GET /api/bangumi/calendar */
export async function calendarUsingGET(options?: { [key: string]: any }) {
  return request<API.BaseResponseListBangumiCalendarVO_>('/api/bangumi/calendar', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 根据关键字搜索条目 POST /api/bangumi/search/subject */
export async function searchSubjectUsingPOST(
  body: API.BangumiSearchRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageBangumiSearchSubjectSmallVO_>('/api/bangumi/search/subject', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 搜索条目(复杂搜索)-试验性API POST /api/bangumi/v0/search/subject */
export async function searchSubjectV0UsingPOST(
  body: API.BangumiSearchV0Request,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageBangumiSearchSubjectSmallVO_>(
    '/api/bangumi/v0/search/subject',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 根据ID获取条目信息 GET /api/bangumi/v0/subject/${param0} */
export async function subjectsDetailUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.subjectsDetailUsingGETParams,
  options?: { [key: string]: any },
) {
  const { subject_id: param0, ...queryParams } = params;
  return request<API.BaseResponseBangumiSubjectDetailVO_>(`/api/bangumi/v0/subject/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
